<template>
  <div :class="formItemWarpClasses" :style="wrapStyles">
    <!--label-->
    <label :class="labelClasses" :style="labelStyles" v-if="isShowLabel">
      <slot name="label">{{label}}</slot>
    </label>
    <!-- switch主体 -->
    <label :class="wrapClasses">
      <input
        ref="switch"
        v-on="inputListeners"
        v-bind:value="checked"
        v-bind="inputAttrs"
      />
      <span tabindex="0" :class="innerClasses">
        <span v-show="currentChecked" v-text="labelOn"></span>
        <span v-show="!currentChecked" v-text="labelOff"></span>
      </span>
    </label>
    <!--验证提示-->
    <div :class="errorTipClasses" :style="errorTipStyles" v-if="isShowMessage">{{validateMessage}}</div>
  </div>
</template>
<script type="text/ecmascript-6"  src="./index.js"></script>
